﻿//========================================================= 
/**@file zabbix_monitor.h
 * @brief zabbix监控接口
 * 
 * @date 2018-09-10   16:51:26
 * @author Zhyioo 
 * @version 1.0
 */ 
//--------------------------------------------------------- 
#ifndef _LIBZHOUYB_ZABBIX_MONITOR_H_
#define _LIBZHOUYB_ZABBIX_MONITOR_H_
//--------------------------------------------------------- 
#include <iostream>

#include "../../include/Base.h"
//--------------------------------------------------------- 
namespace zhou_yb {
namespace wrapper {
namespace zabbix_extractor {
//--------------------------------------------------------- 
/**
 * @brief zabbix监控项配置
 * @date 2018-09-11 08:34
 */
class zabbix_monitor
{
protected:
    zabbix_monitor() {}
public:
    /// 采用命令行调用的方式
    template<class TMonitor>
    static int execute(int argc, const char* argv[])
    {
        typename TMonitor::value_type val = TMonitor::execute(argc, argv);
        string rlt = ArgConvert::ToString<typename TMonitor::value_type>(val);
        std::cout << rlt;
        return 0;
    }
};
//--------------------------------------------------------- 
} // namespace zabbix_extractor 
} // namespace wrapper
} // namespace zhou_yb 
//--------------------------------------------------------- 
#endif // _LIBZHOUYB_ZABBIX_MONITOR_H_
//========================================================= 